<?php namespace App\Http\Requests;

class GetVerifyCodeByPhoneRequest extends Request
{
    /**
     * 验证手机获取验证码的手机格式
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    public function attributes()
    {
        return [
            'phone' => '手机号码',
        ];
    }

    public function rules()
    {
        return [
            'phone' => ['required', 'regex:/1\d{10}/'],
        ];
    }
}
